package sealte.wdgf.control.servlet.system;

import java.io.IOException;
import java.text.MessageFormat;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class SystemGetServlet extends SystemServlet {

	private static final long serialVersionUID = -4675083501399915027L;
	
	@Override
	protected void service(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		String method = req.getMethod();
		if(method.equals("GET")){
			doGet(req,resp);
		}else{
			String errMsg = "Method {0} is not defined in this path!";
            Object[] errArgs = new Object[1];
            errArgs[0] = method;
            errMsg = MessageFormat.format(errMsg, errArgs);
            
            resp.sendError(HttpServletResponse.SC_NOT_IMPLEMENTED, errMsg);
		}
	}
	
}
